<?
use kartik\widgets\Select2;
use yii\helpers\ArrayHelper;
use backend\models\Desempeno;
use backend\models\Observaciongeneral;
use backend\models\Frd;

// CALIFICACIONES POR NUMEROS POR ASIGNATURA

// CALIFICACIONES DEL SABER SEGUN LA PARAMETRIZACION DEL GRADO



// CALIFICACIONES DEL SER SEGUN LA PARAMETRIZACION DEL GRADO

if ($num_calificaciones_ser > 0)
{

?>
    <td class='info'>

<?php
/*            
            echo $form->field($calificacion, "[$index]ser[$x]")->widget(Select2::classname(), [
                'data' => ArrayHelper::map(Desempeno::find()->where(['tipo_calificacion' => '1'])->orderBy('id')->asArray()->all(), 'id', 'desempeno'),
                'hideSearch' => false,
                'pluginOptions' => [
                    'placeholder' => '',
                    'allowClear' => true,
                ],
            ])->label(false);
*/

        echo $form->field($calificacion, "[$index]ser[$x]")->textinput([
                 'value' => isset($nota) ? $nota->ser : '',
                 'onkeyup' => 'mayusculas(this.id)',
                 'onChange' => 'mayusculas(this.id)',
                 'class'=>'form-control input-sm text-calificacion',
            ])->label(false);
?>
    </td>

<?php } ?>


<td>
    <?= $form->field($calificacion, "[$index]observacion_general[$x]")->textinput([
         'value' => isset($nota) ? $nota->psi : '',
         'onkeyup' => 'validar('.$index.','.$tipo_calificacion.')',
         'onChange' => 'validar('.$index.','.$tipo_calificacion.')',
         'class'=>'form-control input-sm text-calificacion',
    ])->label(false);
    ?>
</td>    
<td>
    <?= $form->field($calificacion, "[$index]observacion_especifica[$x]")->textinput([
         'value' => isset($nota) ? $nota->psi : '',
         'onkeyup' => 'validar('.$index.','.$tipo_calificacion.')',
         'onChange' => 'validar('.$index.','.$tipo_calificacion.')',
         'class'=>'form-control input-sm text-calificacion',
    ])->label(false);
    ?>
</td>